//
//  CFProgressHUDSuccessIndicatorView.m
//  CFProgressHUD
//
//  Created by 千域互联 on 2018/3/18.
//  Copyright © 2018年 千域互联. All rights reserved.
//

#import "CFProgressHUDSuccessIndicatorView.h"

#import "UIImage+CFProgressHUD.h"

@implementation CFProgressHUDSuccessIndicatorView

- (instancetype)init
{
    return [self initWithContentView:nil];
}

- (instancetype)initWithContentView:(UIView *)contentView
{
    self = [super initWithImage:[[UIImage cf_hud_imageWithName:@"cf_hud_success"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
    
    
    return self;
}

- (void)updateAccessibility
{
    self.accessibilityLabel = NSLocalizedString(@"成功",);
}
- (void)setUpForHUDStyle:(CFProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled
{
    [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled];
    
    if (style == CFProgressHUDStyleDark) {
        self.contentView.tintColor = [UIColor whiteColor];
    }else {
        self.contentView.tintColor = [UIColor blackColor];
    }
}
- (void)tintColorDidChange
{
    [super tintColorDidChange];
    self.contentView.tintColor = self.tintColor;
}

@end
